package com.ambulance.framework.config.converter;

import com.ambulance.common.utils.DateUtils;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component
public class LocalDateTimeConvert implements Converter<String, LocalDateTime> {

    @Override
    public LocalDateTime convert(String source) {
        LocalDateTime localDateTime = DateUtils.parseString(source);
        return localDateTime;
    }

}